SELE 5
set exclu off
USE &DR&F5 INDE &DR&F5
SEEK KODEPAT
IF .NOT. EOF()
   CMS=.T.
   INSTYP=PAT_INSTYP
   INSNAM=PAT_INSNAM
   INSVAL=PAT_INSVAL
ELSE
   CMS=.F.
ENDIF
SELE 1
GO REC
kodepat=pat_filcod
PNAME=PAT_NAME
PFNAME=PAT_F_NAME
MINIT=PAT_M_INIT
PATNAT=PAT_NATIO
PATDOB=PAT_DOB
PATSEX=PAT_SEX
HLDENT=HL_DENT
HLST=HL_START
HLEND=HL_END
HL=HEALTHLINE
grp=blood_grp
rhe=blood_rhe
*ms=med_scheme
*msdate=mds_endate
*msnber=mds_nber
AEAM=AEA_MEMBER
AEADAT=AEA_ENDATE
AEAPRG=alltrim(AEA_PROGR)
Cocod=pat_codcrp
per=aeasos_per
fam=aeasos_fam

DO PATR30
if truepat
   do patr18
endif
IF PRPAT
   SET COLOR TO BG+/B
   @ 7,1 CLEA TO 23,78
   RETURN
ENDIF

